<form class="validforms" enctype="multipart/form-data" method="post" name="user_edit_form" id="user_edit_form">
<section class="flow-consignee ect-bg-colorf">
    <ul>
        <li>
            <div class="input-text"><b class="pull-left"><?php echo $this->translate('用户名称'); ?>：</b><span>
                <?php echo $this->escapeHtml($this->user_info->user_name); ?>
          </span></div>
        </li>
        <?php
        $userEmailRegisterState = $this->frontwebsite()->getRegOrLoginIni('register_email_state');
        $userPhoneRegisterState = $this->frontwebsite()->getRegOrLoginIni('register_phone_state');
        ?>
        <li>
            <div class="input-text"><b class="pull-left"><?php echo $this->translate('电子邮件'); ?>
                    <?php if ($userEmailRegisterState == 'true') { ?>
                        <span class="must_add_value">*</span>
                    <?php } ?>
                    ：</b><span>
          <input type="text" datatype="e" value="<?php echo $this->escapeHtml($this->user_info->user_email); ?>" ajaxurl="<?php echo $this->url('m_user/default/user_id',array('action'=>'check','controller'=>'user','module'=>'user','check_type'=>'user_email','user_id'=>($this->user_info ? $this->user_info->user_id : '0'))); ?>" placeholder="<?php echo $this->translate('请输入电子邮箱'); ?>" <?php if($userEmailRegisterState == 'true') echo 'nullmsg="'.$this->translate('请输入电子邮箱').'"'; ?> name="user_email">
          </span></div>
        </li>
        <li>
            <div class="input-text"><b class="pull-left"><?php echo $this->translate('手机号码'); ?>
                    <?php if ($userPhoneRegisterState == 'true') { ?>
                        <span class="must_add_value">*</span>
                    <?php } ?>
                    ：</b><span>
          <input type="text"  datatype="m" value="<?php echo $this->escapeHtml($this->user_info->user_phone); ?>" ajaxurl="<?php echo $this->url('m_user/default/user_id',array('action'=>'check','controller'=>'user','module'=>'user','check_type'=>'user_phone','user_id'=>($this->user_info ? $this->user_info->user_id : '0'))); ?>" placeholder="<?php echo $this->translate('请输入手机号码'); ?>"  name="user_phone" <?php if($userPhoneRegisterState == 'true') echo 'nullmsg="'.$this->translate('请输入手机号码').'"'; ?> errormsg="<?php echo $this->translate('手机号码格式错误'); ?>">
          </span></div>
        </li>
        <?php
        if(!empty($this->user_reg_extend['inputArray'])) {
            foreach($this->user_reg_extend['inputArray'] as $g_value) {
                ?>
                <li>
                    <div class="input-text">
                        <b>
                            <?php echo $this->escapeHtml($g_value['field_title']); ?>
                            <?php if(!empty($g_value['not_empty'])) { ?><font class="must_add_value">*</font><?php } ?>：
                        </b>
                        <span>
                                    <?php if($g_value['field_type'] == 'radio' and !empty($g_value['body'])) {
                                        foreach($g_value['body'] as $cKey => $g_b_value) {
                                            ?>
                                            <input type="radio" name="<?php echo $g_value['name']; ?>" <?php echo !empty($g_value['input_value']) ? ($g_value['input_value']==$g_b_value[0] ? 'checked' : '') : ($cKey == 0 ? 'checked' : ''); ?> <?php if(!empty($g_value['not_empty'])) { ?>class="<?php echo $g_value['name']; ?>" datatype="*"<?php } ?> value="<?php echo $g_b_value[0]; ?>"><?php echo $g_b_value[1]; ?>&nbsp;
                                        <?php } } ?>
                            <?php if($g_value['field_type'] == 'checkbox' and !empty($g_value['body'])) {
                                foreach($g_value['body'] as $g_b_value) {
                                    $checkedArray  = !empty($g_value['input_value']) ? explode(',', $g_value['input_value']) : array();
                                    ?>
                                    <input type="checkbox" <?php echo (!empty($checkedArray) and in_array($g_b_value[0], $checkedArray)) ? 'checked' : ''; ?> name="<?php echo $g_value['name']; ?>[]" <?php if(!empty($g_value['not_empty'])) { ?>class="<?php echo $g_value['name']; ?>" datatype="*"<?php } ?> value="<?php echo $g_b_value[0]; ?>" ><?php echo $g_b_value[1]; ?>&nbsp;
                                <?php } } ?>
                            <?php if($g_value['field_type'] == 'select' and !empty($g_value['body'])) {
                                echo '<select name="'.$g_value['name'].'" id="'.$g_value['id'].'" '.(!empty($g_value['not_empty']) ? 'datatype="*"' : '').' class="span2">';
                                foreach($g_value['body'] as $g_b_value) {
                                    ?>
                                    <option value="<?php echo $g_b_value[0]; ?>" <?php if($g_b_value[0] == $g_value['input_value']) echo 'selected'; ?>><?php echo $g_b_value[1]; ?></option>
                                <?php } echo '</select>'; } ?>
                            <?php if($g_value['field_type'] == 'text') { ?>
                                <input type="text" id="<?php echo $g_value['id']; ?>" name="<?php echo $g_value['name']; ?>" <?php if(!empty($g_value['not_empty'])) echo 'datatype="*" nullmsg="'.$g_value['not_empty'].'"'; ?> value="<?php echo $this->escapeHtml($g_value['input_value']); ?>">
                            <?php } ?>
                            <?php if($g_value['field_type'] == 'textarea') { ?>
                                <textarea name="<?php echo $g_value['name']; ?>" id="<?php echo $g_value['id']; ?>"  <?php if(!empty($g_value['not_empty'])) echo 'datatype="*" nullmsg="'.$g_value['not_empty'].'"'; ?>><?php echo $this->escapeHtml($g_value['input_value']); ?></textarea>
                            <?php } ?>
                            <?php if($g_value['field_type'] == 'upload') { ?>
                                <input type="file" name="<?php echo $g_value['name']; ?>" id="<?php echo $g_value['id']; ?>" <?php if(!empty($g_value['not_empty'])) echo 'datatype="*" nullmsg="'.$g_value['not_empty'].'"'; ?>>
                            <?php } ?>
                                </span>
                    </div>
                </li>
                <?php
            }
        }
        ?>
    </ul>
</section>

<div class="two-btn ect-padding-tb ect-padding-lr ect-margin-tb text-center">
    <input type="submit" class="btn btn-info" value="<?php echo $this->translate('确认修改'); ?>" name="submit">
</div>
</form>